package com.mineoj.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.mineoj.model.dto.competition.CompetitionQueryRequest;
import com.mineoj.model.entity.Competition;
import com.baomidou.mybatisplus.extension.service.IService;
import com.mineoj.model.entity.Competition;
import com.mineoj.model.vo.CompetitionVO;

import javax.servlet.http.HttpServletRequest;

/**
* @author 明月
* @description 针对表【competition(比赛)】的数据库操作Service
* @createDate 2025-04-20 18:59:17
*/
public interface CompetitionService extends IService<Competition> {
    /**
     * 校验
     *
     * @param competition
     * @param add
     */
    void validCompetition(Competition competition, boolean add);

    /**
     * 获取查询条件
     *
     * @param competitionQueryRequest
     * @return
     */
    QueryWrapper<Competition> getQueryWrapper(CompetitionQueryRequest competitionQueryRequest);


    /**
     * 获取比赛封装
     *
     * @param competition
     * @param request
     * @return
     */
    CompetitionVO getCompetitionVO(Competition competition, HttpServletRequest request);

    /**
     * 分页获取比赛封装
     *
     * @param competitionPage
     * @param request
     * @return
     */
    Page<CompetitionVO> getCompetitionVOPage(Page<Competition> competitionPage, HttpServletRequest request);

}
